package com.relax.mybatis.plugin.sensitive.util;

import com.relax.mybatis.plugin.sensitive.strategy.SensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.AddressSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.BankCardSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.CarNumberSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.ChineseNameSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.DefaultSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.EmailSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.IdCardSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.MobileSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.PasswordSensitiveStrategy;
import com.relax.mybatis.plugin.sensitive.strategy.impl.PhoneSensitiveStrategy;

/**
 * Test
 *
 * @author hebin
 * @date 2024/6/19
 * @since
 */
public class Test {

    public static void main(String[] args) {
        String data = "12345678910";
        String symbol = "*";
        System.out.println("默认脱敏：" + new DefaultSensitiveStrategy().handle(data, symbol));
        System.out.println("中文姓名脱敏：" + new ChineseNameSensitiveStrategy().handle(data, symbol));
        System.out.println("身份证号码脱敏：" + new IdCardSensitiveStrategy().handle(data, symbol));
        System.out.println("电话号码脱敏：" + new PhoneSensitiveStrategy().handle(data, symbol));
        System.out.println("手机号码脱敏：" + new MobileSensitiveStrategy().handle(data, symbol));
        System.out.println("地址脱敏：" + new AddressSensitiveStrategy().handle(data, symbol));
        System.out.println("邮箱脱敏：" + new EmailSensitiveStrategy().handle(data, symbol));
        System.out.println("银行卡号脱敏：" + new BankCardSensitiveStrategy().handle(data, symbol));
        System.out.println("车牌号脱敏：" + new CarNumberSensitiveStrategy().handle(data, symbol));
        System.out.println("密码脱敏：" + new PasswordSensitiveStrategy().handle(data, symbol));
    }

}
